package com.itheima.thread;
/*
Runnable  匿名内部类 和lambda表达式实现
 */
public class Demo03 {


    public static void main(String[] args) {
        Thread t = new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 100; i++) {
                    System.out.println("匿名内部类执行到了"+i);
                }
            }
        });
        t.start();
        Thread t2 = new Thread(() -> {
            for (int i = 0; i < 100; i++) {
                System.out.println("lambda执行到了"+i);
            }
        });
        t2.start();



        for (int i = 0; i < 100; i++) {
            System.out.println("main中执行到了"+i);
        }

    }

}
